using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SPGE
{
    public enum DefaultResourceGroups { LoadScene, AlwaysLoaded, Menu, Stage1, Stage2, Stage3, Stage4, Stage5 };
    public struct ResourceGroup
    {
        internal string groupName;
        internal IEnumerable<AScene> scenes;

        public ResourceGroup(DefaultResourceGroups group, IEnumerable<AScene> scenes)
            : this(group.ToString(), scenes)
        { }

        public ResourceGroup(string group, IEnumerable<AScene> scenes)
            :this()
        {
            if (group == DefaultResourceGroups.LoadScene.ToString() && scenes.Count() != 1)
#if DEBUG
                throw new Exception("Cannot have more than one scene in the LoadingScene group.");
#else
            {
                groupName = group;

                var sc = new List<AScene>(1);

                sc.Add(scenes.First());

                scenes = sc;
            }
#endif
        }
    }
}
